package newsrecommendation.mediator;

import puj.news.dto.Noticia;
import newsrecommendation.datamodel.utils.Scores;

/**
 *
 * @author Andrea
 */
public class NewsTileResponse {
    private String id;
    private int size;//1-small 2-large
    private boolean isPopular;
    private int popularityPosition;
    private boolean isLike;
    private Noticia noticia;
    
    public Noticia getNoticia(){
    	return noticia;
    }
    
    public void setNoticia(Noticia noticia){
    	this.noticia = noticia;
    }
    
    
    public NewsTileResponse(String id, int size) {
        this.id = id;
        this.size = size;
        this.isPopular= false;
        this.popularityPosition = 0;
    }

    public String getId() {
        return id;
    }

    public int getSize() {
        return size;
    }
    
    public String getSizeString(){
        if(size==Scores.SIZE_SMALL){
            return "SMALL";
        }else{
            return "LARGE";
        }
    }

    public boolean isPopular() {
        return isPopular;
    }

    public int getPopularityPosition() {
        return popularityPosition;
    }

    public void setPopularityPosition(int position) {
        this.isPopular=true;
        this.popularityPosition = position;
    }

    public boolean isIsPopular() {
        return isPopular;
    }

    public void setIsPopular(boolean isPopular) {
        this.isPopular = isPopular;
    }

    public boolean isIsLike() {
        return isLike;
    }

    public void setIsLike(boolean isLike) {
        this.isLike = isLike;
    }
    
}
